package com.rs.service.impl;

import com.rs.config.BusinessException;
import com.rs.dao.ExamStudentRelationDAO;
import com.rs.dao.StudentDAO;
import com.rs.entity.*;
import com.rs.entity.Class;
import com.rs.entity.login.Menu;
import com.rs.entity.login.User;
import com.rs.entity.vo.AddUserVO;
import com.rs.service.StudentLoginService;
import com.rs.util.Md5Utils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.CollectionUtils;
import org.springframework.util.StringUtils;

import java.util.List;

/**
 * @author dehang
 * @date 2019/6/1
 */
@Service
public class StudentLoginServiceImpl implements StudentLoginService {

    @Autowired
    private StudentDAO studentDAO;

    @Override
    public Student login(String username) throws Exception{

        // 校验登陆
        Student student = studentDAO.login(username);
        if (student == null) {
            return null;
        }
        return student;

    }

   

}
